//	@file Version: 1.0
//	@file Name: fn_refillbox.sqf  "fn_refillbox"
//	@file Author: [404] Pulse , [404] Costlyy , [404] Deadbeat
//	@file Created: 22/1/2012 00:00
//	@file Args: [ OBJECT (Weapons box that needs filling), STRING (Name of the fill to give to object)]
if (!isServer) exitWith {};
private ["_selectedBox", "_selectedBoxPos", "_finishedBox", "_currBox"];

_box = _this select 0;
_selectedBox = _this select 1;

switch(_selectedBox) do {
    case "mission_Mid_BAF": { // Broad selection of mid-high tier weapons 
    	_currBox = _box;
        
        // Clear prexisting weapons first
        clearMagazineCargoGlobal _currBox;
		clearWeaponCargoGlobal _currBox;
        
        // Add new weapons before ammunition
     _currBox addWeaponCargoGlobal ["I44_G43",2];
        _currBox addWeaponCargoGlobal ["I44_G43Zf4",1];
		_currBox addWeaponCargoGlobal ["I44_K43",2];			
		_currBox addWeaponCargoGlobal ["I44_K98k",2];
        _currBox addWeaponCargoGlobal [" I44_K98k_GGrGer",1];
		_currBox addWeaponCargoGlobal ["I44_K98kZf42",1];
        _currBox addWeaponCargoGlobal [" I44_LeeEnfield",2];
        _currBox addWeaponCargoGlobal ["I44_LeeEnfieldNo4Mk1",1];		
		_currBox addWeaponCargoGlobal ["I44_LeeEnfieldNo4Mk1_T",1];
		_currBox addWeaponCargoGlobal ["I44_M1903A3_M1",1];	 
        _currBox addWeaponCargoGlobal ["I44_M37Ithaca",2];

        
        // Add ammunition
        _currBox addMagazineCargoGlobal ["I44_10rd_792x57_Tracer_G43",5];
        _currBox addMagazineCargoGlobal ["I44_10rd_792x57_Mix_G43",5];
        _currBox addMagazineCargoGlobal ["I44_10rd_792x57_Ball_G43",5];
		_currBox addMagazineCargoGlobal ["I44_5rd_792x57_Tracer_K98",10];
        _currBox addMagazineCargoGlobal ["I44_10rd_77x56R_Ball_LeeEnfield",20];
        _currBox addMagazineCargoGlobal ["I44_5rd_792x57_AP_K98",10];
        _currBox addMagazineCargoGlobal ["I44_10rd_792x57_AP_G43",5];
        _currBox addMagazineCargoGlobal ["I44_5rd_762x63_AP_M1903",10];
        _currBox addMagazineCargoGlobal ["I44_5rd_762x63_Tracer_M1903",10];
		_currBox addMagazineCargoGlobal ["I44_4xM19_12ga_00Buckshot_M37",20];
        _currBox addMagazineCargoGlobal ["I44_HandGrenade_No82",5];
        _currBox addMagazineCargoGlobal ["I44_HandGrenade_Mk2",5];
        _currBox addMagazineCargoGlobal ["I44_HandGrenade_No36M",5];
		_currBox addMagazineCargoGlobal ["I44_HandGrenade_StiHgr24x7",5]; 			
    };
    case "mission_Side_USLaunchers": { // Used in the airwreck side mission
    	_currBox = _box;

        // Clear prexisting weapons first
        clearMagazineCargoGlobal _currBox;
		clearWeaponCargoGlobal _currBox;

		// Add new weapons before ammunition
        _currBox addWeaponCargoGlobal ["I44_Rocket_60mm_M6A1_M1A1Bazooka",2];
		_currBox addWeaponCargoGlobal ["I44_Grenade_PIATMk3",2];
        _currBox addWeaponCargoGlobal ["I44_PzFaust100",4];
		_currBox addWeaponCargoGlobal ["I44_RPzB54",4];	
		// Add ammunition
        _currBox addMagazineCargoGlobal ["I44_Rocket_60mm_M6A1_M1A1Bazooka",5];
        _currBox addMagazineCargoGlobal ["I44_Rocket_149mm_PzF_100",5];
        _currBox addMagazineCargoGlobal ["I44_Rocket_88mm_RPzBGr4322_RPzB54",5];
        _currBox addMagazineCargoGlobal ["I44_Grenade_PIATMk3",5];
    };
    case "mission_Side_USSpecial": { // Used in the airwreck side mission
    	_currBox = _box;
        
        // Clear prexisting weapons first
        clearMagazineCargoGlobal _currBox;
		clearWeaponCargoGlobal _currBox;
        
        // Add new weapons before ammunition
        _currBox addWeaponCargoGlobal ["I44_M1A1Thompson",3];
		_currBox addWeaponCargoGlobal ["I44_M3Greasegun",3];
		_currBox addWeaponCargoGlobal ["I44_MP40",3];
        _currBox addWeaponCargoGlobal ["I44_StenMk2",3];
		_currBox addWeaponCargoGlobal [" I44_FG42I",3];	 
        _currBox addWeaponCargoGlobal ["I44_FG42II",3];
        _currBox addWeaponCargoGlobal ["I44_PzFaust100",4];

        _currBox addMagazineCargoGlobal ["I44_20rd_792x57_Tracer_FG42",20];
        _currBox addMagazineCargoGlobal ["I44_30rd_1143x23_Tracer_M1A1Thompson",40];
        _currBox addMagazineCargoGlobal ["I44_32rd_9x19_Ball_Sten",40];
        _currBox addMagazineCargoGlobal ["I44_32rd_9x19_Ball_MP40",40];
        _currBox addMagazineCargoGlobal ["I44_20rd_792x57_AP_FG4",20];
        _currBox addMagazineCargoGlobal ["I44_32rd_9x19_Ball_MP40",40];
        _currBox addMagazineCargoGlobal ["I44_Rocket_149mm_PzF_100",4];		
    };
};